﻿@using NTQOnlineExam.Services.Infrastructure.MVC
@model NTQOnlineExamFrontend.Models.PortfolioSearchViewModel
<script src="@Url.Content("~/Scripts/portfolio.js")"  type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/nqt-sort-grid.js")"  type="text/javascript"></script>
@{
    ViewBag.Title = this.LocalResources("PageTitle");
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="row">
    <div class="col-sm-6">
        <div class="input-group">
            <input class="form-control" type="text" value="@Model.Keyword" id="portfolio-search-keyword" placeholder="Search by Exam Type, Exam ID">
            <span class="input-group-btn">
                <button class="btn btn-red" type="button" onclick="Portfolio.Search();">
                    <i class="fa fa-search"></i>
                </button>
            </span>
        </div>
    </div>
</div>
<input type="hidden" value="0" id="portfolio-selectedpage"/>
<input type="hidden" value="" id="portfolio-hidden-searchkeyword"/>
<div class="table-responsive margin-top-3">
    <table id="portfolio-grid" class="table table-striped">
        <thead>
            <tr>
                <th class="sortable wid-80"  role="TermId">@this.LocalResources("TermId")
                     <span class="sorticon none" title="Sorting">
                        <p>none</p>
                    </span>
                </th>
                <th class="sortable col-sm-4" role="TermName">@this.LocalResources("TermName")
                    <span class="sorticon none" title="Sorting">
                        <p>none</p>
                    </span>
                </th>
                <th class="sortable" role="OrderDate">@this.LocalResources("OrderDate")
                    <span class="sorticon none" title="Sorting">
                        <p>none</p>
                    </span>
                </th>
                <th class="sortable" role="ExpiredDate">@this.LocalResources("ExpiredDate")
                    <span class="sorticon none" title="Sorting">
                        <p>none</p>
                    </span>
                </th>
             @*   <th class="sortable wid-90" role="LatestScore">@this.LocalResources("LastScore")
                    <span class="sorticon none" title="Sorting">
                        <p>none</p>
                    </span>
                </th>*@
                <th class="sortable " role="HighestScore">@this.LocalResources("HighestScore")
                    <span class="sorticon none" title="Sorting">
                        <p>none</p>
                    </span>
                </th>
                <th class="command"></th>
            </tr>
        </thead>
        <tbody id="portfolio-content">
           
        </tbody>
    </table>
     <div id="portfolio-paging">
        
    </div>
</div>

<script type="text/javascript">
    $(document).ready(function () {
        NQTSort.Init("portfolio-grid", Portfolio.Search);
        NQTSort.RequestData();
        $('#portfolio-search-keyword').keypress(function (e) {
            var key = e.which;
            if (key == 13)  // the enter key code
            {
                NQTSort.RequestData();
                return false;
            } 
        });
    });
    
    

</script>
